package swg.shape;

public class Color
{
	protected int r;
	protected int g;
	protected int b;
	
	
	public Color()
	{
	}

	public Color(int r, int g, int b)
	{
		this.r = r;
		this.g = g;
		this.b = b;
	}

	public Color(int i)
	{
		this.r = i;
		this.g = i;
		this.b = i;
	}

	public int getR()
	{
		return r;
	}

	public void setR(int r)
	{
		this.r = r;
	}

	public int getG()
	{
		return g;
	}

	public void setG(int g)
	{
		this.g = g;
	}

	public int getB()
	{
		return b;
	}

	public void setB(int b)
	{
		this.b = b;
	}

	public static String randomColor()
	{
		int r = (int) (Math.random()*255);
		int g = (int) (Math.random()*255);
		int b = (int) (Math.random()*255);
		return "rgb("+r+","+g+","+b+") ";
	}

	public static String randomGrey()
	{
		int b = (int) (Math.random()*255);
		return "rgb("+b+","+b+","+b+") ";
	}
	
	public static String randomGrey(int max, int min)
	{
		int b = (int) (min+ Math.random()*(max-min));
		return "rgb("+b+","+b+","+b+") ";
	}
	
	public String getSWGCode(){
		return "rgb("+r+","+g+","+b+") ";
	}

}
